function run() {
	try {
		setUp();
		execute();
		verify();
		tearDown();
	} catch(e) {
		log(e);
		log(e.stack);
		throw e;
	}
}

function setUp() {
	tearDown();

	panda.db.eval(function(){
		var users = db.users;
		users.ensureIndex({ name: 1 });

		users.insert({ name: "user1", desc: "desc1" });
		users.insert({ name: "user2", desc: "desc2" });
		users.insert({ name: "user3", desc: "desc3" });
		users.insert({ name: "xxxxx", desc: "desc3", age: 20 });
	});
}

function tearDown() {
	context = {};

	panda.db.eval(function(){
		db.users.drop();
	});
}

function log(s) {
	s === undefined ?
		java.lang.System.out.println() :
		java.lang.System.out.println(s);
}

